package com.mcf.world.controller;

import com.mcf.world.entity.User;
import com.mcf.world.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    IUserService userService;
    @RequestMapping("/add")
    public String add(User user){
        if(userService.save(user)){
           return "ok";
        }
        return "error";
    }
}
